import layoutHeaderAside from '@/layout/header-aside'

// 由于懒加载页面太多的话会造成webpack热更新太慢，所以开发环境不使用懒加载，只有生产环境使用懒加载
const _import = require('@/libs/util.import.' + process.env.NODE_ENV)

const meta = { auth: true }

export default {
  path: '/market',
  name: 'market',
  meta,
  redirect: { name: 'market-customer' },
  component: layoutHeaderAside,
  children: [
    { path: 'price', name: 'market-price', component: _import('market/price'), meta: { ...meta, title: '报价管理' } },
    { path: 'contract', name: 'market-contract', component: _import('market/contract'), meta: { ...meta, title: '合同管理' } },
    { path: 'customer', name: 'market-customer', component: _import('market/customer'), meta: { ...meta, title: '客户管理' } },
    { path: 'customer_create', name: 'market-customer-create', component: _import('market/customer_create'), meta: { ...meta, title: '添加客户' } },
    { path: 'customer_contract', name: 'market-customer-contract', component: _import('market/customer_contract'), meta: { ...meta, title: '合同信息' } }
  ]
}
